import {
	defineStore
} from 'pinia'
import {
	ref,
	computed
} from 'vue'

const storeSetup = () => {
	/* 定义数据--------------------------------------------------------------------- */
	// 企业介绍列表
	const companyIntroduceList = ref([
	])
	
	
	// 当前修改的企业介绍信息
	const currentEditCompanyIntroduceInfo = ref({
		id:null,
		title:"",
		contentText:"",
		contentImages:[]
	})
	
	// 当前企业资料id
	const currentCompanyId = ref(null)
	
	// 当前是添加还是修改的标识
	const isAdd = ref(true)
	
	
	// 产品介绍列表
	const productIntroduceList = ref([])
	


	/* 定义函数--------------------------------------------------------------------- */

	// 返回参数
	return {
		companyIntroduceList,
		currentEditCompanyIntroduceInfo,
		isAdd,
		productIntroduceList,
		currentCompanyId
	}
}

// 导出Store
export const useCardStore = defineStore('card', storeSetup)